<?php
$id = $epg['id'];
$data = preg_replace('/\n|\r| /','',file_get_contents('https://www.discoverychannel.com.tw/'.$id.'_index.php'));
preg_match('/<divclass="programItemWrap">(.*?)<\/div><\/a><\/div><!/',$data,$data);
preg_match_all('/<pclass="time">(.*?)<\/p><div><pclass="name">(.*?)<\/p><pclass="detail">(.*?)</',$data[0],$epg);
for($i = 0; $i <= count($epg[1]) - 1; $i++) {
    echo '<li><span>'.$epg[1][$i].'&nbsp&nbsp&nbsp&nbsp'.$epg[2][$i].'：'.$epg[3][$i].'</span></li>';
};